from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from LogoutPage import LogoutPage
from AdminHandler import AdminHandler
from Pages.ApplicationInit import ApplicationInit
from PSPages.PSPagesApplicationInit import PSPagesApplicationInit

WSGIApplicationArray =     [
     ('/logout', LogoutPage),
     ('/admin', AdminHandler)
    ]

WSGIApplicationArray = ApplicationInit.InitWSGIApplicationArray(WSGIApplicationArray, False)
WSGIApplicationArray = PSPagesApplicationInit.InitWSGIApplicationArray(WSGIApplicationArray)

application = webapp.WSGIApplication(
    WSGIApplicationArray,
    debug=True)


def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()